package com.jzo2o.customer.controller.agency;


import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IAgencyCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 机构认证审核表 前端控制器
 * </p>
 *
 * @author whx
 * @since 2024-12-02
 */
@RestController
@RequestMapping("/agency/agency-certification-audit")
@Api(tags = "机构端-提交认证相关接口")
public class AgencyCertificationAuditController {

    @Autowired
    private IAgencyCertificationAuditService agencyCertificationAuditService;

    @PostMapping
    @ApiOperation("提交认证申请")
    public void submitCertification(@RequestBody AgencyCertificationAuditAddReqDTO dto){
        agencyCertificationAuditService.submitCertification(dto);
    }

    @GetMapping("/rejectReason")
    @ApiOperation("查询最近的驳回原因")
    public RejectReasonResDTO rejectReason(){
        return agencyCertificationAuditService.rejectReason();
    }

}
